package com.huzz.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.huzz.entity.SysUser;
import com.huzz.model.SysUserCreateModel;
import com.huzz.model.SysUserQueryModel;
import com.huzz.model.SysUserUpdateModel;
import com.huzz.vo.SysUserVO;
import com.huzz.util.body.DataBox;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
* 系统用户-业务模块接口
*
* @author 童年的纸飞机
* @since 2023-06-06 20:05
*/
public interface ISysUserService extends IService<SysUser> {

    /**
     * 根据进行ID查询SysUser
     *
     * @param id
     * @return
     */
    SysUserVO getSysUserById(Integer id);

    /**
     * 新增SysUser
     * @param model
     * @return
     */
    boolean createSysUser(SysUserCreateModel model);

    /**
     * 更新SysUser
     * @param model
     * @return
     */
    boolean updateSysUser(SysUserUpdateModel model);

    /**
     * 根据ID进行删除SysUser
     * @param id
     * @return
     */
    boolean deleteSysUserById(Integer id);

    /**
     * 分页查询SysUser列表
     * @param pageNum
     * @param pageSize
     * @param model
     * @return
     */
    IPage<SysUserVO> selectSysUserPage(Integer pageNum, Integer pageSize, SysUserQueryModel model);

    /**
     * 查询SysUser列表
     * @param model
     * @return
     */
    List<SysUser> selectSysUserList(SysUserQueryModel model);

    /**
     * 导出SysUser列表
     * @param request
     * @param response
     * @param model
     * @return
     */
    void exportSysUserExcel(HttpServletRequest request, HttpServletResponse response, SysUserQueryModel model);

    /**
     * 批量编辑SysUser
     * @param modelList
     * @return
     */
    DataBox<String> updateSysUserByList(List<SysUserUpdateModel> modelList);

    /**
     * 批量删除
     * @param ids
     * @return
     */
    DataBox<String> deleteSysUserByIds(List<Integer> ids);

}